<?php //use_helper('Date')?>

<?php if (count($comments)>=1):?>
	<div id="status_comments"></div>
	<?php $last = count($comments)-1;
		foreach($comments as $i => $comment):?>
		<div id="comment<?php echo $comment->getId()?>" class="index_list <?php if($i==$last):?>last<?php endif;?>">
			
					<?php echo jq_link_to_remote(image_tag('delete_quest.png',array('title'=>'Удалить','style'=>'float:right;margin:0 0 0 5px;')),array(
						'update'=>'status_comments',
						'url'=>'default/delete?comment_id='.$comment->getId(),
						'confirm'=>'Вы уверены?',
						'loading' => jq_visual_effect('fadeIn',  '#status_comments'),
      					'complete'=> jq_visual_effect('fadeOut', '#status_comments').';$("#comment'.$comment->getId().'").remove()'
					))?>
					
					<?php echo format_date(strtotime($comment->getCreatedAt()),'f','ru')?> | <?php echo $comment->getSfGuardUser()->getName()?><br />
					<?php echo $comment->getBody()?>
			<br />
		</div>
	<?php endforeach;?>
<?php else:?>
Комментарии отсутствуют
<?php endif;?>
<div class="clear">&nbsp;</div>